@layout("/common/_container.html",{js:["/assets/modular/system/demand/demand.js"]}){
<div class="layui-body-header">
    <span class="layui-body-header-title">需求申请</span>
</div>

<div class="layui-fluid">
    <div class="layui-row layui-col-space15">
        <div class="layui-col-sm12 layui-col-md12 layui-col-lg12">
            <div class="layui-card">
                <div class="layui-card-body">
                    <div class="layui-form toolbar">
                        <div class="layui-form-item">
                            <div class="layui-inline">
                            @if(shiro.hasPermission("/demand/add")){
                            <button id="btnAdd" class="layui-btn icon-btn"><i class="layui-icon">&#xe654;</i>添加需求</button>
                            @}
                            <button id="btnExp" class="layui-btn icon-btn"><i class="layui-icon">&#xe67d;</i>导出</button>
                            </div>
                        </div>
                    </div>
                    <table class="layui-table" id="demandTable" lay-filter="demandTable">
                    </table>
                </div>
            </div>
        </div>
    </div>
</div>

<script type="text/html" id="tableBar">

    @if(shiro.hasPermission("/demand/conduct")){
    {{#  if(d.state == '待处理'){ }}
    <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="edit">待处理</a>
    {{#  } else if(d.state == '处理中'){ }}
    <a class="layui-btn layui-btn-normal layui-btn-xs" lay-event="edit">处理中</a>
    {{#  } else if(d.state == '已完成'){ }}
    <a class="layui-btn layui-btn-green layui-btn-xs" lay-event="edit">已完成</a>
    {{#  }
    }}
    @}
    @if(shiro.hasPermission("/demand/remove")){
    <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="delete">删除</a>
    @}
    @if(shiro.hasPermission("/demand/details")){
    <a class="layui-btn layui-btn-primary layui-btn-xs" lay-event="details">详情</a>
    @}

</script>



@}